<?php
namespace app\front\controller\v2;

use app\front\controller\v2\BaseController;
use app\front\service\v2\ShareWx;

class ShareController extends  BaseController
{
   public function shareWx(){
      $shareData= $this->getShareWxService()->shareWx();
      $this->assign('imgurl',  $shareData['imgurl']);
      $this->assign('userid',  $shareData['userid']);
      $this->assign('moneyNum',  $shareData['moneyNum']);
      $this->assign('red_packet',$shareData['red_packet']  );
      $this->assign('store_name', $shareData['store_name'] );
      $this->assign('phone', $shareData['phone'] );
      $this->assign('address', $shareData['address'] );
      $this->assign('timestamp', $shareData['timestamp']);
      $this->assign('nonceStr', $shareData['nonceStr']);
      $this->assign('signature', $shareData['signature']);
      $this->assign('out_trade_no', $shareData['out_trade_no']);
      return view('v2/share');
   }
   public function shareRedPack(){
       $result=$this->getShareWxService()->HongBaoForShare();
       return view('v2/'.$result);
   }

}

